home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
pstui100.zip
/
DEMO3.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-02-09
|
5KB
|
196 lines
{
╔══════════════════╗
║ PTUI Demo ║
║ ║
║ Rev. 1.00 ║
╚══════════════════╝
}
{$F-} {$O-} {$A+} {$G-}
{$V-} {$B-} {$X-} {$N+} {$E+}
{$I FINAL.PAS}
{$IFDEF FINAL}
{$I-} {$R-}
{$D-} {$L-} {$S-}
{$M 8192,262144,655360}
{$ELSE}
{$M 8192,0,655360}
{$ENDIF}
Program PTUIDemo;
Uses CRT,PTUI,Strings,PTUIVCRT;
Const
DelayTime = 500;
Procedure TextDemo;
Var
SlideBar :SlideBarInfo;
TWin1 :TextWindow;
TWin2 :TextWindow;
Y,
X :Byte;
C :Char;
Temp :String;
Begin
VideoColor(7,0);
ClrScr;
Mouse.Init(True);
Mouse.Show;
CursorSize($20,$20);
VideoColor(3,7);
For X:=1 to 71 do
WriteStr('Pure Power TUI ');
WriteStr('Pur');
TWin1.Open(10,10,50,20,Yellow,Green,Blue,Magenta,NoLine,Solid);
TWin1.NewSize(10,5,50,20);
TWin1.NewHeading('Information',CentreText,0,3);
Repeat
VideoColor(0,2);
GotoXY(12,11);
WriteStr('To demonstarte the "Change Size"');
GotoXY(12,12);
WriteStr('feature, this box will change');
GotoXY(12,13);
WriteStr('sizes, ranging from small to');
GotoXY(12,14);
WriteStr('large. Press a number from 1 to 3,');
GotoXY(12,15);
WriteStr('or press [Esc] to continue.');
GotoXY(12,17);
Str(MemAvail,Temp);
WriteStr('Free Memory: '+Temp+' bytes.');
C:=ReadKey;
Case C Of
'1':TWin1.NewSize(10,8,50,20);
'2':TWin1.NewSize( 9,5,60,20);
'3':TWin1.NewSize( 6,3,70,22);
End;
Until C=#27;
X:=50;
Y:=20;
TWin1.NewHeading('',LeftText,0,3);
Repeat
TWin1.NewSize(4,4,X,Y);
Dec(Y,2);
Dec(X,4);
Until Y<7;
TWin1.Close;
TWin1.Open(20,8,60,20,Green,Black,Red,Blue,DoubleLine,Solid);
TWin1.NewHeading('Box Styles',CentreText,0,2);
Repeat
VideoColor(2,0);
GotoXY(22,11);
WriteStr('To demonstarte the "Box Styles"');
GotoXY(22,12);
WriteStr('feature, this box will change');
GotoXY(22,13);
WriteStr('styles. Select the different');
GotoXY(22,14);
WriteStr('styles by selecting a letter range A');
GotoXY(22,15);
WriteStr('to L or pressing [Esc] to continue.');
GotoXY(22,17);
Str(MemAvail,Temp);
WriteStr('Free Memory: '+Temp+' bytes.');
C:=UpCase(ReadKey);
Case C Of
'A':TWin1.NewStyle( 2,0,6,0,SingleLine,Solid);
'B':TWin1.NewStyle( 2,0,6,0,DoubleLine,Solid);
'C':TWin1.NewStyle( 2,0,6,0, NoLine,Solid);
'D':TWin1.NewStyle( 4,0,6,0,SingleLine,LightHash);
'E':TWin1.NewStyle( 4,0,6,0,DoubleLine,LightHash);
'F':TWin1.NewStyle( 4,0,6,0, NoLine,LightHash);
'G':TWin1.NewStyle(14,0,6,0,SingleLine,MediumHash);
'H':TWin1.NewStyle(14,0,6,0,DoubleLine,MediumHash);
'I':TWin1.NewStyle(14,0,6,0, NoLine,MediumHash);
'J':TWin1.NewStyle(10,0,2,0,SingleLine,DarkHash);
'K':TWin1.NewStyle(12,0,2,0,DoubleLine,DarkHash);
'L':TWin1.NewStyle(10,0,2,0, NoLine,DarkHash);
End;
Until C=#27;
TWin1.NewSize(30,10,50,17);
TWin1.NewStyle(2,0,6,4,NoLine,Solid);
TWin1.NewHeading('Window 1',CentreText,0,2);
VideoColor(2,0);
GotoXY(32,13);
WriteStr('Windows can also');
GotoXY(32,14);
WriteStr('lie in the back.');
TWin2.Open(10,5,35,15,0,2,4,5,SingleLine,Solid);
TWin2.NewHeading('Window 2',CentreText,0,4);
VideoColor(0,2);
GotoXY(12,9);
WriteStr('Windows can be moved');
GotoXY(12,10);
WriteStr('around the screen so');
GotoXY(12,11);
WriteStr('easily!');
Delay(DelayTime);
TWin2.NewPosition(15,10);
Delay(DelayTime);
TWin2.NewPosition(20,5);
Delay(DelayTime);
TWin2.NewPosition(10,3);
Delay(DelayTime);
TWin2.NewPosition(40,12);
Delay(DelayTime);
TWin2.NewPosition(25,9);
Delay(DelayTime);
TWin2.NewPosition(50,2);
Delay(DelayTime);
TWin2.NewPosition(52,12);
TWin2.Close;
VideoColor(2,0);
GotoXY(32,13);
WriteStr(' Bye Bye ');
GotoXY(32,14);
WriteStr(' See you later. ');
C:=ReadKey;
TWin1.Close;
End;
Procedure EndTextDemo;
Var
Y,
X:Byte;
Begin
VideoColor(7,0);
Y:=1;
Repeat
X:=0;
Repeat
GotoXY(1+X,Y);
WriteStr(' ');
GotoXY(80-X,Y);
WriteStr(' ');
GotoXY(1+X,25-Y);
WriteStr(' ');
GotoXY(80-X,25-Y);
WriteStr(' ');
Inc(X);
Until X=41;
Inc(Y);
Until Y=13;
End;
Begin
PushCursorSize;
TextDemo;
EndTextDemo;
PopCursorSize;
End.